/**
 * 
 */
package com.bifrost.task;


import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.bifrost.sellentity.*;
import com.bifrost.service.ExternalOrderService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import com.xxl.job.core.log.XxlJobLogger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import com.bifrost.exception.BonusPointsNotEnoughException;
import com.bifrost.exception.ExternalOrderProcessException;
import com.bifrost.model.ExternalOrder;
import com.bifrost.model.ExternalOrderItem;
import com.bifrost.model.ExternalPayment;
import com.bifrost.sellRepository.SelldetailCbRepository;
import com.bifrost.sellRepository.SellheadCbRepository;
import com.bifrost.sellRepository.SellpaymentCbRepository;
import com.bifrost.sellRepository.SendjfWxLogRepository;
import com.bifrost.service.BonusPointsService;

/**
 * @author zhuangzhuang
 * @date 2018年5月9日
 */
@Component
@JobHandler(value="bonusPointsTask")
public class BonusPointsTask extends IJobHandler{
@Autowired
    ExternalOrderService externalOrderService;
    public void execute(){

        externalOrderService.proces();
    }

    @Override
    public ReturnT<String> execute(String s) throws Exception {
        XxlJobLogger.log("处理线下积分开始");
        externalOrderService.proces();
        XxlJobLogger.log("处理线下积分完成");
        return ReturnT.SUCCESS;
    }
}
